home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 7
/
Apprentice-Release7.iso
/
Source Code
/
Pascal
/
Applications
/
TCPExample
/
PNL Libraries
/
MyLookFreeOT.p
< prev
next >
Wrap
Text File
|
1996-08-02
|
954b
|
46 lines
unit MyLookFreeOT;
interface
uses
Types, OpenTransport;
function OTLFSndUData(ref: EndpointRef; var udata: TUnitData): OSStatus;
function OTLFRcvUData(ref: EndpointRef; var udata: TUnitData; var flags: OTFlags): OSStatus;
implementation
function OTLFSndUData(ref: EndpointRef; var udata: TUnitData): OSStatus;
var
err, junk: OSStatus;
i: integer;
begin
for i := 1 to 20 do begin
err := OTSndUData( ref, @udata );
if err = kOTLookErr then begin
junk := OTRcvUDErr( ref, nil );
end else begin
leave;
end;
end;
OTLFSndUData := err;
end;
function OTLFRcvUData(ref: EndpointRef; var udata: TUnitData; var flags: OTFlags): OSStatus;
var
err, junk: OSStatus;
i: integer;
begin
for i := 1 to 20 do begin
err := OTRcvUData( ref, @udata, flags );
if err = kOTLookErr then begin
junk := OTRcvUDErr( ref, nil );
end else begin
leave;
end;
end;
OTLFRcvUData := err;
end;
end.